-
-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make a vitest
unit test for the Rules Engine Python whl
#109
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
3da36e0
to
17812a5
Compare
@alanisaac Welcome to review. I also changed the Github Action python target version to 3.11.3 which is the current pyodide release's version . The main next step I can think of is moving the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I notice in public/pyodide-env
that it looks like there's a binary related to the Python dependencies used (like numpy
). Are those meant to be committed to source control?
@alanisaac Yep, that folder re-hosts locally:
Both of these binaries have to be fetched at Javascript run-time and aren't bundleable along with the Pyodide Javascript library itself. |
I tried to run pytest and the test_engine.py from within the Pyodide environment. I executed that file contents in python within Pyodide, then ran Based on that, If we want an internal Pyodide test like More broadly, if we want to run |
Thad will:
|
Also, just to be sure, close the block comment at https://github.com/codeforboston/home-energy-analysis-tool/pull/109/files#diff-ae03e02fefef517ad9aa21f08290622cf90b06ccfb95f94362b273a43a70aa9eR16. [It's fine for now, but if we remove the in-line commenting, it'll be a problem.] |
32e1ea5
to
5266c84
Compare
…oston#109) * add pyodide rules_engine whl test with vitest * bump pyodide to 0.24.1 from Sept 25 * add test github action for frontend test, fix linter * change python target ver, adjust gha names * make eslint warn no-unused-vars * rebase & add pydantic typing deps to pyodide unit test
From the
heat-stack
folder, runnpm test app/utils/pyodide.test.ts
or see the newwhole heat-stack
Checks below.npm run test
should pre-run the necessary python build commands, not too sure about dependencies (seepackage.json
)/pyodide-env
for browserpublic/pyodide-env
forvitest
environmentengine.hdd(57, 60)
but we may ultimately want to use an alternative version of the test_rules_engine/*.py files.eslintignore
deploy
andplaywright
GitHub actions:main
and added new type definition requirements.txt to test andpublic/pyodide-env
folder to make pass again.Full output:
Test output:
Intentional fail:
Pass: